package org.gwt.pluginframework.common.event;

import java.util.Map;

import org.gwt.pluginframework.common.IPlugin;

/**
 * Plug-in event used to pass messages (events) through interested plug-ins.
 * 
 * Events are identified by name.
 * 
 * @author mszymanski
 */
public interface IPluginEvent {
	/**
	 * Returns event name.
	 * 
	 * @return
	 */
	String getName();
	
	/**
	 * Returns event invoker.
	 * 
	 * There is a possibility that invoker is null then the message is special 
	 * because no plug-in triggered it.
	 * 
	 * @return
	 */
	IPlugin getInvoker();

	/**
	 * Parameters on event. Usually some references to objects or simple types
	 * such as Strings - names, Longs - identifiers.
	 * 
	 * @return
	 */
	Map<String, Object> getParameters();
}